An example of a collection with a relatively large number of children
that are hidden from the tree.
The tree works well when the notes are structured in a hierarchy so that
the number of items stays small. When a note has a large number of notes
(in the order of thousands or tens of thousands), two problems arise:
Navigating between notes becomes cumbersome and the tree itself gets cluttered
with a large amount of notes.
The large amount of notes can slow down the application considerably.
Since v0.102.0, Trilium allows the tree to hide the child notes of particular
notes. This works for both Collections and
normal notes.
Interaction
When the subtree of a note is hidden, there are a few subtle changes:
To indicate that the subtree is hidden, the note will not have an expand
button and it will display the number of children to the right.
It's not possible to add a new note directly from the tree.
For Collections,
it's best to use the built-in mechanism to create notes (for example by
creating a new point on a geo-map, or by adding a new row in a table).
For normal notes, it's still possible to create children via other means
such as using the Internal (reference) links system.
Notes can be dragged from outside the note, case in which they will be
cloned into it.
Instead of switching to the child notes that were copied, the parent note
is highlighted instead.
A notification will indicate this behavior.
Similarly, features such as cut/copy and then paste into the note will
also work.
Spotlighting
Even if the subtree of a note is hidden, if a child note manages to become
active, it will still appear inside the tree in a special state called spotlighted.
During this state, the note remains under its normal hierarchy, so that
its easy to tell its location. In addition, this means that:
The note position is clearly visible when using the Search.
The note can still be operated on from the tree, such as adding a
Branch prefix or moving it outside the collection.
The note appears in italics to indicate its temporary display. When switching
to another note, the spotlighted note will disappear.
Working with collections
By default, some of the Collections will
automatically hide their child notes, for example the Kanban Board or the Table.
The reasoning behind this is that collections are generally opaque to
the rest of the notes and they can generate a large amount of sub-notes
since they intentionally lack structure (in order to allow easy swapping
between views).
Some types of collections have the child notes intentionally shown, for
example the legacy ones (Grid and List), but also the Presentation which requires the tree
structure in order to organize and edit the slides.
To toggle this behavior:
In the New Layout,
press the Options button underneath the title and uncheck Hide child notes in tree.
Right click the collection note in the Note Tree and select Advanced → Show subtree.
Working with normal notes
It's possible to hide the subtree for normal notes as well, not just collections.
To do so, right click the note in the Note Tree and
select Advanced → Hide subtree.